Skip to content

fix(files_external): skip BSD ftpd total N listing headers - #63197

Open
xusnitdinov wants to merge 1 commit into
nextcloud:masterfrom
xusnitdinov:fix/ftp-bsd-total-header
Open

fix(files_external): skip BSD ftpd total N listing headers#63197
xusnitdinov wants to merge 1 commit into
nextcloud:masterfrom
xusnitdinov:fix/ftp-bsd-total-header

Conversation

@xusnitdinov

Copy link
Copy Markdown

Summary

  • BSD ftpd prepends LIST output with a total N line. The raw-list fallback in FtpConnection tried to parse that as a file entry and threw Metadata can't be parsed from item 'total 17'.
  • Skip empty lines and total headers the same way flysystem does. . / .. are still parsed as cdir / pdir.

Fixes #37045

Checklist

  • Code is from this PR's author
  • Signed-off-by is in the commit
  • Tests added where possible (parser is private; existing FTP tests are integration-only against a live server)

Made with Cursor

BSD ftpd prepends directory listings with a `total N` line. The raw
LIST parser treated that as a file entry and threw, so external FTP
storage against FreeBSD could not be browsed.

Skip empty lines and `total` headers the same way flysystem does,
while still parsing `.` / `..` as cdir/pdir.

Fixes: nextcloud#37045

Signed-off-by: Xusnitdinov Azizbek <252487890+xusnitdinov@users.noreply.github.com>
@xusnitdinov
xusnitdinov requested a review from a team as a code owner August 13, 2026 06:18
@xusnitdinov
xusnitdinov requested review from CarlSchwan, icewind1991, provokateurin and sorbaugh and removed request for a team August 13, 2026 06:18
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@joshtrichards joshtrichards added this to the Nextcloud 36 milestone Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: External Storage against BSD ftp server failing due to parsing difference

2 participants